package com.example.controller;/**
 * @author wangXiao
 */

import com.example.entity.base.ResponseData;
import com.example.entity.dto.LoginVo;
import com.example.service.SakuraService;
import com.example.service.SysUserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 登录管理
 * @Author wangXiao
 * @Date 2024/10/10 
 **/
@RequestMapping("/loginController")
@Controller
public class LoginController {

    @Resource
    private SysUserService sysUserService;

    @Resource(name = "sakuraServiceImpl")
    public SakuraService sakuraService;

    @RequestMapping(value = "/login", method = RequestMethod.POST)
    @ApiOperation("登录接口")
    public ResponseData login(@RequestBody LoginVo loginVo){
        return sysUserService.login(loginVo);
    }

    @RequestMapping(value = "/testService", method = RequestMethod.POST)
    @ApiOperation("测试断点")
    public void testService(@RequestBody LoginVo loginVo){
        List<String> list=  sakuraService.selectUsers();
        System.out.println(list);
    }
}
